package com.taoyige.bean;

import java.io.InputStream;
import java.io.Serializable;
import java.util.List;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;

import com.taoyige.common.JacksonJsonUtil;

/**
 * 欢迎界面实体类
 * @author peter
 * @version 1.0
 * @created 2014-11-14
 */
@JsonIgnoreProperties(ignoreUnknown=true)
public class WelcomeImage implements Serializable{
	
	private boolean update;
	private String startDate;
	private String endDate;
	
	private List<WelcomeImgItem> imglist;
	
	public List<WelcomeImgItem> getImglist() {
		return imglist;
	}

	public void setImglist(List<WelcomeImgItem> imglist) {
		this.imglist = imglist;
	}

	  public static class WelcomeImgItem implements Serializable{
		private String coverImgUrl;

		public String getCoverImgUrl() {
			return coverImgUrl;
		}

		public void setCoverImgUrl(String coverImgUrl) {
			this.coverImgUrl = coverImgUrl;
		}
		
	}
	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}
	
	public boolean isUpdate() {
		return update;
	}

	public void setUpdate(boolean update) {
		this.update = update;
	}

	public static WelcomeImage parse(InputStream ins) throws  Exception {
		WelcomeImage img = (WelcomeImage) JacksonJsonUtil.jsonToBean(ins, WelcomeImage.class);
		return img;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}
	
}
